package com.xxxx.server.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xxxx.server.pojo.*;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *员工账套
 * @author zhoubin
 * @since 2020-08-17
 */
public interface EmployeeMapper extends BaseMapper<Employee> {
    //查询员工账套
    List<SalaryEmployee> selectSalaryEmployee(@Param("currentPage") Integer currentPage, @Param("size") Integer size);

    //统计数据
    int getEmployeeTotal();

    //修改更新员工账套所属工资账套
    int updateSalaryEmployee(Integer eid,Integer sid);

    //导出所有数据
    List<Employee> findAllEmployee();

    //分页展示数据
    List<Employee> getEmployeeByPage(@Param("currentPage") Integer currentPage, @Param("size") Integer size, @Param("emp") Employee employee, @Param("beginDateScope") Date[] beginDateScope);

    //时间差
    Long getTotal(@Param("emp") Employee employee,@Param("beginDateScope") Date[] beginDateScope);

    //更新员工信息
    Integer updateEmployeeById(Employee employee);

    //根据ID删除员工信息
    Integer deleteEmployeeById(Integer id);

    //添加一条员工信息
    Integer addEmployeeOne(EmployeeAdd employeeAdd);

    //获取员工对象根据id
    Employee getEmployeeById(Integer empId);


    //最大工号  完成添加时的自增
    Integer maxWorkID();



    //导入数据 批量增加
    Integer addEmployees(@Param("list") List<Object> list);

    /**
     *导入表格
     */
    void saveBatch(List<EmployeeImport> list);
}
